# -*- coding: UTF-8 -*-

import unittest
from selenium import webdriver
from poium import Page,Element

class SearchPage(Page):
    search_input = Element(id_='kw')
    search_button = Element(id_='su')
class testSearch(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        cls.driver = webdriver.Chrome()
    def test_search_case(self):
        driver = SearchPage(self.driver)
        driver.get('http://www.baidu.com')
        driver.search_input = '深圳'
        driver.search_button.click()
    @classmethod
    def tearDownClass(cls):
        cls.driver.quit()

if __name__ == '__main':
    unittest.main()